package com.wanxi.study;

public class method {
    public static void main(String[] args) {

      theEven(1,10);

    }


    public static void addOrEven() {//
        int i = 10;
        if (i % 2 == 0) {
            System.out.println("偶数");
        }
        if (i % 2 != 0) {
            System.out.println("奇数");
        }
    }

    public static void orAddEven(int num) {//带参数的方法

        if (num % 2 == 0) {
            System.out.println("偶数");
        }
        if (num % 2 != 0) {
            System.out.println("奇数");
        }
    }

    public static int and(int a, int b) {//带返回值的方法用viod用数据类型替代

        int c = a + b;
        return c;

    }


    public static int max(int a, int b) {//带返回值的方法用viod用数据类型替代

        int max = a > b ? a : b;
        return max;

    }


    public static void theEven(int n, int m) {//带参数的方法

    }


    public static void theFor(int n) {//带参数的方法
        for (int i = 1; i <= n; i++) {
            System.out.println("陈明");

        }
    }


    public static void allEven() {
        for (int i = 1; i <= 10; i++) {
            if (i % 2 == 0) {
                System.out.println(i);
            }
        }
    }


}



